package com.kashow.bean.comment;

import android.text.TextUtils;

import com.kashow.bean.BaseBean;

import java.util.List;

/**
 * Created by yybs on 16/11/15.
 */

public class Comment extends BaseBean{

    /**
     * _id : 27
     * user : {"_id":1,"userName":"张颜增","openid":"ohHipv3s4me1xn_j-AIaPb_bEBd0","phone":"18072505678","wxUserInfo":{"openid":"ohHipv3s4me1xn_j-AIaPb_bEBd0","nickname":"雪花","sex":2,"city":"崇左","province":"广西","country":"中国","headimgurl":"http://wx.qlogo.cn/mmopen/PxpCwCeBADPsn6PvP65icDkY7XLv8B5Bk5BcHggwPdZtavVBM1KcBSAKnHOaHFyeeSTWGl47j3RiaYjXVX2QzDq8lhQVKyFqMn/0","updatedAt":"2016-09-18T08:19:24.000Z"},"createdAt":"2016-10-24T05:38:36.495Z","isSub":true,"sex":1,"balance":0,"score":0,"level":1,"isTeacher":true,"__v":0,"authInfo":{"status":1,"createdAt":"2016-11-26T13:37:53.696Z"},"remark":"{\"age\":\"33\",\"exp\":\"Y\",\"good\":\"营销\"}","followers":"{\"count\":1,\"updatedAt\":1480509633664}"}
     * live : null
     * message : 创建消息测试18
     * floor : 18
     * showName : true
     * grade : [{"name":"吐字清晰","score":5},{"name":"幽默风趣","score":5},{"name":"实用落地","score":5}]
     * read : 1
     * createdAt : 2016-10-24 13:38:37
     * comments : []
     * id : 27
     */

    private int _id;
    private UserBean user;
    private String message;
    private int floor;
    private boolean showName;
    private int read;
    private String createdAt;
    private String id;
    private String grade;
    private List<ReplyComment> comments;

    public int get_id() {
        return _id;
    }

    public void set_id(int _id) {
        this._id = _id;
    }

    public UserBean getUser() {
        return user;
    }

    public void setUser(UserBean user) {
        this.user = user;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public int getFloor() {
        return floor;
    }

    public void setFloor(int floor) {
        this.floor = floor;
    }

    public boolean isShowName() {
        return showName;
    }

    public void setShowName(boolean showName) {
        this.showName = showName;
    }

    public int getRead() {
        return read;
    }

    public void setRead(int read) {
        this.read = read;
    }

    public String getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(String createdAt) {
        this.createdAt = createdAt;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getGrade() {
        return grade;
    }

    public void setGrade(String grade) {
        this.grade = grade;
    }

    public List<ReplyComment> getComments() {
        return comments;
    }

    public void setComments(List<ReplyComment> comments) {
        this.comments = comments;
    }

    public static class UserBean {
        /**
         * _id : 1
         * userName : 张颜增
         * openid : ohHipv3s4me1xn_j-AIaPb_bEBd0
         * phone : 18072505678
         * wxUserInfo : {"openid":"ohHipv3s4me1xn_j-AIaPb_bEBd0","nickname":"雪花","sex":2,"city":"崇左","province":"广西","country":"中国","headimgurl":"http://wx.qlogo.cn/mmopen/PxpCwCeBADPsn6PvP65icDkY7XLv8B5Bk5BcHggwPdZtavVBM1KcBSAKnHOaHFyeeSTWGl47j3RiaYjXVX2QzDq8lhQVKyFqMn/0","updatedAt":"2016-09-18T08:19:24.000Z"}
         * createdAt : 2016-10-24T05:38:36.495Z
         * isSub : true
         * sex : 1
         * balance : 0
         * score : 0
         * level : 1
         * isTeacher : true
         * __v : 0
         * authInfo : {"status":1,"createdAt":"2016-11-26T13:37:53.696Z"}
         * remark : {"age":"33","exp":"Y","good":"营销"}
         * followers : {"count":1,"updatedAt":1480509633664}
         */

        private int _id;
        private String userName;
        private String openid;
        private String phone;
        private WxUserInfoBean wxUserInfo;
        private String createdAt;
        private boolean isSub;
        private int sex;
        private int balance;
        private int score;
        private int level;
        private boolean isTeacher;
        private AuthInfoBean authInfo;
        private String remark;
        private String followers;

        public int get_id() {
            return _id;
        }

        public void set_id(int _id) {
            this._id = _id;
        }

        public String getUserName() {
            return userName;
        }

        public void setUserName(String userName) {
            this.userName = userName;
        }

        private String headimgurl;
        private String nickname;

        public String getNickname() {
            if (TextUtils.isEmpty(nickname) && wxUserInfo!= null) {
                nickname = wxUserInfo.getNickname();
            }
            return nickname;
        }

        public void setNickname(String nickname) {
            this.nickname = nickname;
        }

        public String getHeadimgurl() {
            if (TextUtils.isEmpty(headimgurl) && wxUserInfo != null) {
                headimgurl = wxUserInfo.getHeadimgurl();
            }
            return headimgurl;
        }

        public void setHeadimgurl(String headimgurl) {
            this.headimgurl = headimgurl;
        }

        public String getOpenid() {
            return openid;
        }

        public void setOpenid(String openid) {
            this.openid = openid;
        }

        public String getPhone() {
            return phone;
        }

        public void setPhone(String phone) {
            this.phone = phone;
        }

        public WxUserInfoBean getWxUserInfo() {
            return wxUserInfo;
        }

        public void setWxUserInfo(WxUserInfoBean wxUserInfo) {
            this.wxUserInfo = wxUserInfo;
        }

        public String getCreatedAt() {
            return createdAt;
        }

        public void setCreatedAt(String createdAt) {
            this.createdAt = createdAt;
        }

        public boolean isIsSub() {
            return isSub;
        }

        public void setIsSub(boolean isSub) {
            this.isSub = isSub;
        }

        public int getSex() {
            return sex;
        }

        public void setSex(int sex) {
            this.sex = sex;
        }

        public int getBalance() {
            return balance;
        }

        public void setBalance(int balance) {
            this.balance = balance;
        }

        public int getScore() {
            return score;
        }

        public void setScore(int score) {
            this.score = score;
        }

        public int getLevel() {
            return level;
        }

        public void setLevel(int level) {
            this.level = level;
        }

        public boolean isIsTeacher() {
            return isTeacher;
        }

        public void setIsTeacher(boolean isTeacher) {
            this.isTeacher = isTeacher;
        }

        public AuthInfoBean getAuthInfo() {
            return authInfo;
        }

        public void setAuthInfo(AuthInfoBean authInfo) {
            this.authInfo = authInfo;
        }

        public String getRemark() {
            return remark;
        }

        public void setRemark(String remark) {
            this.remark = remark;
        }

        public String getFollowers() {
            return followers;
        }

        public void setFollowers(String followers) {
            this.followers = followers;
        }

        public static class WxUserInfoBean {
            /**
             * openid : ohHipv3s4me1xn_j-AIaPb_bEBd0
             * nickname : 雪花
             * sex : 2
             * city : 崇左
             * province : 广西
             * country : 中国
             * headimgurl : http://wx.qlogo.cn/mmopen/PxpCwCeBADPsn6PvP65icDkY7XLv8B5Bk5BcHggwPdZtavVBM1KcBSAKnHOaHFyeeSTWGl47j3RiaYjXVX2QzDq8lhQVKyFqMn/0
             * updatedAt : 2016-09-18T08:19:24.000Z
             */

            private String openid;
            private String nickname;
            private int sex;
            private String city;
            private String province;
            private String country;
            private String headimgurl;
            private String updatedAt;

            public String getOpenid() {
                return openid;
            }

            public void setOpenid(String openid) {
                this.openid = openid;
            }

            public String getNickname() {
                return nickname;
            }

            public void setNickname(String nickname) {
                this.nickname = nickname;
            }

            public int getSex() {
                return sex;
            }

            public void setSex(int sex) {
                this.sex = sex;
            }

            public String getCity() {
                return city;
            }

            public void setCity(String city) {
                this.city = city;
            }

            public String getProvince() {
                return province;
            }

            public void setProvince(String province) {
                this.province = province;
            }

            public String getCountry() {
                return country;
            }

            public void setCountry(String country) {
                this.country = country;
            }

            public String getHeadimgurl() {
                return headimgurl;
            }

            public void setHeadimgurl(String headimgurl) {
                this.headimgurl = headimgurl;
            }

            public String getUpdatedAt() {
                return updatedAt;
            }

            public void setUpdatedAt(String updatedAt) {
                this.updatedAt = updatedAt;
            }
        }

        public static class AuthInfoBean {
            /**
             * status : 1
             * createdAt : 2016-11-26T13:37:53.696Z
             */

            private int status;
            private String createdAt;

            public int getStatus() {
                return status;
            }

            public void setStatus(int status) {
                this.status = status;
            }

            public String getCreatedAt() {
                return createdAt;
            }

            public void setCreatedAt(String createdAt) {
                this.createdAt = createdAt;
            }
        }
    }
}
